package com.ymttest.database.sqlwapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.couponsendsubtask;
import com.ymttest.database.model.couponsendtaskfailrecord;
import com.ymttest.utils.EnvSetup;

public class couponsendtaskfailrecordWapper {
	SqlManager manager;

    public couponsendtaskfailrecordWapper() {
        manager = new SqlManager("mysqlcoupon" + EnvSetup.getEnv());
    }
    
    public couponsendtaskfailrecord selectByPrimaryKey(Integer taskId)  {
    	couponsendtaskfailrecord couponsendtaskfailrecord=new couponsendtaskfailrecord();
    	Map map=new HashMap<String,Object>();
    	map.put("taskId", taskId);
        List<couponsendtaskfailrecord> result = manager
                .getSelectResults(
                        "com.ymttest.database.mapping.couponsendtaskfailrecordMapper.selectByPrimaryKey",
                        map);
        if(result.size()>0)
        {
        	couponsendtaskfailrecord=result.get(0);	
        }
        return couponsendtaskfailrecord;
    }
    public List<couponsendtaskfailrecord> selectByTaskId(Integer taskId)  {
    	Map map=new HashMap<String,Object>();
    	map.put("taskId", taskId);
        List<couponsendtaskfailrecord> result = manager
                .getSelectResults(
                        "com.ymttest.database.mapping.couponsendtaskfailrecordMapper.selectByTaskId",
                        map);
      
        return result;
    }



    public static void main(String[] args) {
    //	couponsendtaskfailrecordfailrecordWapper test = new couponsendtaskfailrecordfailrecordWapper();

      //  System.out.println(test.usecouponsendsubtask(20238699, "AIL7PT3W1",null));
        // test.insertYmtcouponsendsubtaskSetting(3,11);
        // Logger.debug(test.getLastYmtcouponsendsubtaskSettingId());


    }
}
